package com.demo.morning;

import java.util.ArrayList;

/**
 * @ClassName List测试
 * @Description TODO
 * @Author tianqinglong
 * @Date 11:30 2022/7/11
 * @Version 1.0
 **/
public class List测试 {
    public static void main(String[] args) {
        ArrayList<String> objects = new ArrayList<>();
        for (int i = 0; i < 100000; i++) {
            new Thread(() -> {
                objects.add(Thread.currentThread().getName());
            }).start();
        }
        System.out.println(objects.size());
    }
}
